﻿using System;
using System.Windows.Forms;

namespace Amgine
{
    public partial class SettingsForm : Form
    {
        public SettingsForm()
        {
            InitializeComponent();
        }

        private void SettingsForm_Load(object sender, EventArgs e)
        {
            checkBox_allow_use_more_resources.Checked = Properties.Settings.Default.allow_use_more_system_resources;
            checkBox_allow_catch_screen.Checked = Properties.Settings.Default.allow_catch_screen;
            checkBox_allow_catch_input.Checked = Properties.Settings.Default.allow_catch_input;
            checkBox_allow_catch_camera.Checked = Properties.Settings.Default.allow_catch_camera;
            checkBox_allow_send_to_author.Checked = Properties.Settings.Default.allow_send_info_to_author;
        }

        private void button_cancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }

        private void button_confirm_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.allow_use_more_system_resources = checkBox_allow_use_more_resources.Checked;
            Properties.Settings.Default.allow_catch_screen = checkBox_allow_catch_screen.Checked;
            Properties.Settings.Default.allow_catch_input = checkBox_allow_catch_input.Checked;
            Properties.Settings.Default.allow_catch_camera = checkBox_allow_catch_camera.Checked;
            Properties.Settings.Default.allow_send_info_to_author = checkBox_allow_send_to_author.Checked;
            Properties.Settings.Default.Save();
            DialogResult = DialogResult.OK;
            Close();
        }
    }
}
